import { createWebHistory, createRouter } from 'vue-router'
import LoginPage from "../pages/user/LoginPage.vue";
import IndexPage from "../pages/IndexPage.vue";
import UserManagePage from "../pages/admin/UserManagePage.vue";
import RegisterPage from "../pages/user/RegisterPage.vue";

const routes : any = [
  { path: '/index',name: "主页" ,component: IndexPage },
  { path: '/login',name: "登录" ,component: LoginPage },
  { path: '/register',name: "注册" ,component: RegisterPage },
  { path: '/admin/userManage',name: "用户管理" ,component: UserManagePage },
  { path: '/', redirect: '/login' }
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router